package main

import "fmt"

// switch
// switch 的另一种用法是像 if...else 那样，在每个分支中单独设置比较条件

func main() {
	var room = "lake"

	// 注意此处的switch后面没有变量。变量放在了case处
	switch {
	case room == "cave":
		fmt.Println("You find yourself in a dimly lit cavern.")
	case room == "lake":
		fmt.Println("The ice seems solid enough.")
	case room == "underwater":
		fmt.Println("The water is freezing cold.")
	}
}
